//
//  YeeHomeCommodityTableViewCell.m
//  YeeShopProject
//
//  Created by CoderYee on 2017/3/1.
//  Copyright © 2017年 CoderYee. All rights reserved.
//

#import "YeeHomeCommodityTableViewCell.h"
@interface YeeHomeCommodityTableViewCell ()
{
       UIView      *_bottomView;
    
}
@end
@implementation YeeHomeCommodityTableViewCell

-(void)addOwnView
{
    _coverView=[[UIImageView alloc] init];
    _coverView.contentMode=UIViewContentModeScaleAspectFill;
    _coverView.clipsToBounds=YES;
    [_coverView setImage:defaultPImage];
    [self.contentView addSubview:_coverView];
    [_coverView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.right.equalTo(self.contentView);
        make.height.mas_equalTo(kMainScreenWidth*0.5*0.7);
    }];
    
    _titlelable=[[UILabel alloc] init];
    _titlelable.numberOfLines=0;
    _titlelable.font=[UIFont Y_systemFontOfSize:12];
    _titlelable.textColor=kGrayColor;
    _titlelable.text=@"推荐推荐推荐推荐推荐推荐推荐";
    [self.contentView addSubview:_titlelable];
    [_titlelable mas_makeConstraints:^(MASConstraintMaker *make)
     {   make.left.equalTo(self.contentView).with.offset(5);
         make.top.equalTo(_coverView.mas_bottom);
         make.height.mas_equalTo(21);
    }];

    _pricelable=[[UILabel alloc] init];
    _pricelable.font=[UIFont Y_systemFontOfSize:8];
    _pricelable.textColor=kGrayColor;
    _pricelable.text=@"$10";
    [self.contentView addSubview:_pricelable];
    [_pricelable mas_makeConstraints:^(MASConstraintMaker *make)
    {
        make.bottom.equalTo(self.contentView);
        make.height.mas_equalTo(21);
        make.left.equalTo(self.contentView).with.offset(5);
    }];
    _countlable=[[UILabel alloc] init];
    _countlable.font=[UIFont Y_systemFontOfSize:8];
    _countlable.textColor=kGrayColor;
    _countlable.text=@"11条评价";
    [self.contentView addSubview:_countlable];
    [_countlable mas_makeConstraints:^(MASConstraintMaker *make)
     {
         make.bottom.equalTo(self.contentView);
         make.height.mas_equalTo(21);
         make.left.equalTo(_pricelable.mas_right).offset(5);
     }];
    
    _likelable=[[UILabel alloc] init];
    _likelable.font=[UIFont Y_systemFontOfSize:8];
    _likelable.textColor=kGrayColor;
    _likelable.text=@"13%好评率";
    [self.contentView addSubview:_likelable];
    [_likelable mas_makeConstraints:^(MASConstraintMaker *make)
     {
         make.bottom.equalTo(self.contentView);
         make.height.mas_equalTo(21);
         make.left.equalTo(_countlable.mas_right).offset(5);
     }];
}

@end
